MIME_TYPES = {
   "application/andrew-inset":	["ez", ],
   "application/annodex":	["anx", ],
   "application/atom+xml":	["atom", ],
   "application/atomcat+xml":	["atomcat", ],
   "application/atomserv+xml":	["atomsrv", ],
   "application/bbolin":	["lin", ],
   "application/cap":	["cap", "pcap", ],
   "application/cu-seeme":	["cu", ],
   "application/davmount+xml":	["davmount", ],
   "application/dsptype":	["tsp", ],
   "application/ecmascript":	["es", ],
   "application/futuresplash":	["spl", ],
   "application/hta":	["hta", ],
   "application/java-archive":	["jar", ],
   "application/java-serialized-object":	["ser", ],
   "application/java-vm":	["class", ],
   "application/javascript":	["js", ],
   "application/m3g":	["m3g", ],
   "application/mac-binhex40":	["hqx", ],
   "application/mac-compactpro":	["cpt", ],
   "application/mathematica":	["nb", "nbp", ],
   "application/msaccess":	["mdb", ],
   "application/msword":	["doc", "dot", ],
   "application/octet-stream":	["bin", ],
   "application/oda":	["oda", ],
   "application/ogg":	["ogx", ],
   "application/pdf":	["pdf", ],
   "application/pgp-keys":	["key", ],
   "application/pgp-signature":	["pgp", ],
   "application/pics-rules":	["prf", ],
   "application/postscript":	["ps", "ai", "eps", "espi", "epsf", "eps2", "eps3", ],
   "application/rar":	["rar", ],
   "application/rdf+xml":	["rdf", ],
   "application/rss+xml":	["rss", ],
   "application/rtf":	["rtf", ],
   "application/smil":	["smi", "smil", ],
   "application/xhtml+xml":	["xhtml", "xht", ],
   "application/xml":	["xml", "xsl", "xsd", ],
   "application/xspf+xml":	["xspf", ],
   "application/zip":	["zip", ],
   "application/vnd.cinderella":	["cdy", ],
   "application/vnd.google-earth.kml+xml":	["kml", ],
   "application/vnd.google-earth.kmz":	["kmz", ],
   "application/vnd.mozilla.xul+xml":	["xul", ],
   "application/vnd.ms-excel":	["xls", "xlb", "xlt", ],
   "application/vnd.ms-pki.seccat":	["cat", ],
   "application/vnd.ms-pki.stl":	["stl", ],
   "application/vnd.ms-powerpoint":	["ppt", "pps", ],
   "application/vnd.oasis.opendocument.chart":	["odc", ],
   "application/vnd.oasis.opendocument.database":	["odb", ],
   "application/vnd.oasis.opendocument.formula":	["odf", ],
   "application/vnd.oasis.opendocument.graphics":	["odg", ],
   "application/vnd.oasis.opendocument.graphics-template":	["otg", ],
   "application/vnd.oasis.opendocument.image":	["odi", ],
   "application/vnd.oasis.opendocument.presentation":	["odp", ],
   "application/vnd.oasis.opendocument.presentation-template":	["otp", ],
   "application/vnd.oasis.opendocument.spreadsheet":	["ods", ],
   "application/vnd.oasis.opendocument.spreadsheet-template":	["ots", ],
   "application/vnd.oasis.opendocument.text":	["odt", ],
   "application/vnd.oasis.opendocument.text-master":	["odm", ],
   "application/vnd.oasis.opendocument.text-template":	["ott", ],
   "application/vnd.oasis.opendocument.text-web":	["oth", ],
   "application/vnd.rim.cod":	["cod", ],
   "application/vnd.smaf":	["mmf", ],
   "application/vnd.stardivision.calc":	["sdc", ],
   "application/vnd.stardivision.chart":	["sds", ],
   "application/vnd.stardivision.draw":	["sda", ],
   "application/vnd.stardivision.impress":	["sdd", ],
   "application/vnd.stardivision.math":	["sdf", ],
   "application/vnd.stardivision.writer":	["sdw", ],
   "application/vnd.stardivision.writer-global":	["sgl", ],
   "application/vnd.sun.xml.calc":	["sxc", ],
   "application/vnd.sun.xml.calc.template":	["stc", ],
   "application/vnd.sun.xml.draw":	["sxd", ],
   "application/vnd.sun.xml.draw.template":	["std", ],
   "application/vnd.sun.xml.impress":	["sxi", ],
   "application/vnd.sun.xml.impress.template":	["sti", ],
   "application/vnd.sun.xml.math":	["sxm", ],
   "application/vnd.sun.xml.writer":	["sxw", ],
   "application/vnd.sun.xml.writer.global":	["sxg", ],
   "application/vnd.sun.xml.writer.template":	["stw", ],
   "application/vnd.symbian.install":	["sis", ],
   "application/vnd.visio":	["vsd", ],
   "application/vnd.wap.wbxml":	["wbxml", ],
   "application/vnd.wap.wmlc":	["wmlc", ],
   "application/vnd.wap.wmlscriptc":	["wmlsc", ],
   "application/vnd.wordperfect":	["wpd", ],
   "application/vnd.wordperfect5.1":	["wp5", ],
   "application/x-123":	["wk", ],
   "application/x-7z-compressed":	["7z", ],
   "application/x-abiword":	["abw", ],
   "application/x-apple-diskimage":	["dmg", ],
   "application/x-bcpio":	["bcpio", ],
   "application/x-bittorrent":	["torrent", ],
   "application/x-cab":	["cab", ],
   "application/x-cbr":	["cbr", ],
   "application/x-cbz":	["cbz", ],
   "application/x-cdf":	["cdf", "cda", ],
   "application/x-cdlink":	["vcd", ],
   "application/x-chess-pgn":	["pgn", ],
   "application/x-cpio":	["cpio", ],
   "application/x-csh":	["csh", ],
   "application/x-debian-package":	["deb", "udeb", ],
   "application/x-director":	["dcr", "dir", "dxr", ],
   "application/x-dms":	["dms", ],
   "application/x-doom":	["wad", ],
   "application/x-dvi":	["dvi", ],
   "application/x-httpd-eruby":	["rhtml", ],
   "application/x-font":	["pfa", "pfb", "gsf", "pcf", "pcf.Z", ],
   "application/x-freemind":	["mm", ],
   "application/x-futuresplash":	["spl", ],
   "application/x-gnumeric":	["gnumeric", ],
   "application/x-go-sgf":	["sgf", ],
   "application/x-graphing-calculator":	["gcf", ],
   "application/x-gtar":	["gtar", "tgz", "taz", ],
   "application/x-hdf":	["hdf", ],
   "application/x-httpd-php":	["phtml", "pht", "php", ],
   "application/x-httpd-php-source":	["phps", ],
   "application/x-httpd-php3":	["php3", ],
   "application/x-httpd-php3-preprocessed":	["php3p", ],
   "application/x-httpd-php4":	["php4", ],
   "application/x-ica":	["ica", ],
   "application/x-info":	["info", ],
   "application/x-internet-signup":	["ins", "isp", ],
   "application/x-iphone":	["iii", ],
   "application/x-iso9660-image":	["iso", ],
   "application/x-jam":	["jam", ],
   "application/x-java-jnlp-file":	["jnlp", ],
   "application/x-jmol":	["jmz", ],
   "application/x-kchart":	["chrt", ],
   "application/x-killustrator":	["kil", ],
   "application/x-koan":	["skp", "skd", "skt", "skm", ],
   "application/x-kpresenter":	["kpr", "kpt", ],
   "application/x-kspread":	["ksp", ],
   "application/x-kword":	["kwd", "kwt", ],
   "application/x-latex":	["latex", ],
   "application/x-lha":	["lha", ],
   "application/x-lyx":	["lyx", ],
   "application/x-lzh":	["lzh", ],
   "application/x-lzx":	["lzx", ],
   "application/x-maker":	["frm", "maker", "frame", "fm", "fb", "book", "fbdoc", ],
   "application/x-mif":	["mif", ],
   "application/x-ms-wmd":	["wmd", ],
   "application/x-ms-wmz":	["wmz", ],
   "application/x-msdos-program":	["com", "exe", "bat", "dll", ],
   "application/x-msi":	["msi", ],
   "application/x-netcdf":	["nc", ],
   "application/x-ns-proxy-autoconfig":	["pac", "dat", ],
   "application/x-nwc":	["nwc", ],
   "application/x-object":	["o", ],
   "application/x-oz-application":	["oza", ],
   "application/x-pkcs7-certreqresp":	["p7r", ],
   "application/x-pkcs7-crl":	["crl", ],
   "application/x-python-code":	["pyc", "pyo", ],
   "application/x-qgis":	["qgs", "shp", "shx", ],
   "application/x-quicktimeplayer":	["qtl", ],
   "application/x-redhat-package-manager":	["rpm", ],
   "application/x-ruby":	["rb", ],
   "application/x-sh":	["sh", ],
   "application/x-shar":	["shar", ],
   "application/x-shockwave-flash":	["swf", "swfl", ],
   "application/x-stuffit":	["sit", "sitx", ],
   "application/x-sv4cpio":	["sv4cpio", ],
   "application/x-sv4crc":	["sv4crc", ],
   "application/x-tar":	["tar", ],
   "application/x-tcl":	["tcl", ],
   "application/x-tex-gf":	["gf", ],
   "application/x-tex-pk":	["pk", ],
   "application/x-texinfo":	["texinfo", "texi", ],
   "application/x-trash":	["~", "%", "bak", "old", "sik", ],
   "application/x-troff":	["t", "tr", "roff", ],
   "application/x-troff-man":	["man", ],
   "application/x-troff-me":	["me", ],
   "application/x-troff-ms":	["ms", ],
   "application/x-ustar":	["ustar", ],
   "application/x-wais-source":	["src", ],
   "application/x-wingz":	["wz", ],
   "application/x-x509-ca-cert":	["crt", ],
   "application/x-xcf":	["xcf", ],
   "application/x-xfig":	["fig", ],
   "application/x-xpinstall":	["xpi", ],
   "audio/amr":	["amr", ],
   "audio/amr-wb":	["awb", ],
   "audio/amr":	["amr", ],
   "audio/amr-wb":	["awb", ],
   "audio/annodex":	["axa", ],
   "audio/basic":	["au", "snd", ],
   "audio/flac":	["flac", ],
   "audio/midi":	["mid", "midi", "kar", ],
   "audio/mpeg":	["mpga", "mpega", "mp2", "mp3", "m4a", ],
   "audio/mpegurl":	["m3u", ],
   "audio/ogg":	["oga", "ogg", "spx", ],
   "audio/prs.sid":	["sid", ],
   "audio/x-aiff":	["aif", "aiff", "aifc", ],
   "audio/x-gsm":	["gsm", ],
   "audio/x-mpegurl":	["m3u", ],
   "audio/x-ms-wma":	["wma", ],
   "audio/x-ms-wax":	["wax", ],
   "audio/x-pn-realaudio":	["ra", "rm", "ram", ],
   "audio/x-realaudio":	["ra", ],
   "audio/x-scpls":	["pls", ],
   "audio/x-sd2":	["sd2", ],
   "audio/x-wav":	["wav", ],
   "chemical/x-alchemy":	["alc", ],
   "chemical/x-cache":	["cac", "cache", ],
   "chemical/x-cache-csf":	["csf", ],
   "chemical/x-cactvs-binary":	["cbin", "cascii", "ctab", ],
   "chemical/x-cdx":	["cdx", ],
   "chemical/x-cerius":	["cer", ],
   "chemical/x-chem3d":	["c3d", ],
   "chemical/x-chemdraw":	["chm", ],
   "chemical/x-cif":	["cif", ],
   "chemical/x-cmdf":	["cmdf", ],
   "chemical/x-cml":	["cml", ],
   "chemical/x-compass":	["cpa", ],
   "chemical/x-crossfire":	["bsd", ],
   "chemical/x-csml":	["csml", "csm", ],
   "chemical/x-ctx":	["ctx", ],
   "chemical/x-cxf":	["cxf", "cef", ],
   "chemical/x-daylight-smiles":	["smi", ],
   "chemical/x-embl-dl-nucleotide":	["emb", "embl", ],
   "chemical/x-galactic-spc":	["spc", ],
   "chemical/x-gamess-input":	["inp", "gam", "gamin", ],
   "chemical/x-gaussian-checkpoint":	["fch", "fchk", ],
   "chemical/x-gaussian-cube":	["cub", ],
   "chemical/x-gaussian-input":	["gau", "gjc", "gjf", ],
   "chemical/x-gaussian-log":	["gal", ],
   "chemical/x-gcg8-sequence":	["gcg", ],
   "chemical/x-genbank":	["gen", ],
   "chemical/x-hin":	["hin", ],
   "chemical/x-isostar":	["istr", "ist", ],
   "chemical/x-jcamp-dx":	["jdx", "dx", ],
   "chemical/x-kinemage":	["kin", ],
   "chemical/x-macmolecule":	["mcm", ],
   "chemical/x-macromodel-input":	["mmd", "mmod", ],
   "chemical/x-mdl-molfile":	["mol", ],
   "chemical/x-mdl-rdfile":	["rd", ],
   "chemical/x-mdl-rxnfile":	["rxn", ],
   "chemical/x-mdl-sdfile":	["sd", "sdf", ],
   "chemical/x-mdl-tgf":	["tgf", ],
   "#chemical/x-mif":	["mif", ],
   "chemical/x-mmcif":	["mcif", ],
   "chemical/x-mol2":	["mol2", ],
   "chemical/x-molconn-Z":	["b", ],
   "chemical/x-mopac-graph":	["gpt", ],
   "chemical/x-mopac-input":	["mop", "mopcrt", "mpc", "zmt", ],
   "chemical/x-mopac-out":	["moo", ],
   "chemical/x-mopac-vib":	["mvb", ],
   "chemical/x-ncbi-asn1":	["asn", ],
   "chemical/x-ncbi-asn1-ascii":	["prt", "ent", ],
   "chemical/x-ncbi-asn1-binary":	["val", "aso", ],
   "chemical/x-ncbi-asn1-spec":	["asn", ],
   "chemical/x-pdb":	["pdb", "ent", ],
   "chemical/x-rosdal":	["ros", ],
   "chemical/x-swissprot":	["sw", ],
   "chemical/x-vamas-iso14976":	["vms", ],
   "chemical/x-vmd":	["vmd", ],
   "chemical/x-xtel":	["xtel", ],
   "chemical/x-xyz":	["xyz", ],
   "image/gif":	["gif", ],
   "image/ief":	["ief", ],
   "image/jpeg":	["jpeg", "jpg", "jpe", ],
   "image/pcx":	["pcx", ],
   "image/png":	["png", ],
   "image/svg+xml":	["svg", "svgz", ],
   "image/tiff":	["tiff", "tif", ],
   "image/vnd.djvu":	["djvu", "djv", ],
   "image/vnd.wap.wbmp":	["wbmp", ],
   "image/x-cmu-raster":	["ras", ],
   "image/x-coreldraw":	["cdr", ],
   "image/x-coreldrawpattern":	["pat", ],
   "image/x-coreldrawtemplate":	["cdt", ],
   "image/x-corelphotopaint":	["cpt", ],
   "image/x-icon":	["ico", ],
   "image/x-jg":	["art", ],
   "image/x-jng":	["jng", ],
   "image/x-ms-bmp":	["bmp", ],
   "image/x-photoshop":	["psd", ],
   "image/x-portable-anymap":	["pnm", ],
   "image/x-portable-bitmap":	["pbm", ],
   "image/x-portable-graymap":	["pgm", ],
   "image/x-portable-pixmap":	["ppm", ],
   "image/x-rgb":	["rgb", ],
   "image/x-xbitmap":	["xbm", ],
   "image/x-xpixmap":	["xpm", ],
   "image/x-xwindowdump":	["xwd", ],
   "message/rfc822":	["eml", ],
   "model/iges":	["igs", "iges", ],
   "model/mesh":	["msh", "mesh", "silo", ],
   "model/vrml":	["wrl", "vrml", ],
   "text/calendar":	["ics", "icz", ],
   "text/css":	["css", ],
   "text/csv":	["csv", ],
   "text/h323":	["323", ],
   "text/html":	["html", "htm", "shtml", ],
   "text/iuls":	["uls", ],
   "text/mathml":	["mml", ],
   "text/plain":	["asc", "txt", "text", "pot", "brf", ],
   "text/richtext":	["rtx", ],
   "text/scriptlet":	["sct", "wsc", ],
   "text/texmacs":	["tm", "ts", ],
   "text/tab-separated-values":	["tsv", ],
   "text/vnd.sun.j2me.app-descriptor":	["jad", ],
   "text/vnd.wap.wml":	["wml", ],
   "text/vnd.wap.wmlscript":	["wmls", ],
   "text/x-bibtex":	["bib", ],
   "text/x-boo":	["boo", ],
   "text/x-c++hdr":	["h++", "hpp", "hxx", "hh", ],
   "text/x-c++src":	["c++", "cpp", "cxx", "cc", ],
   "text/x-chdr":	["h", ],
   "text/x-component":	["htc", ],
   "text/x-csh":	["csh", ],
   "text/x-csrc":	["c", ],
   "text/x-dsrc":	["d", ],
   "text/x-diff":	["diff", "patch", ],
   "text/x-haskell":	["hs", ],
   "text/x-java":	["java", ],
   "text/x-literate-haskell":	["lhs", ],
   "text/x-moc":	["moc", ],
   "text/x-pascal":	["p", "pas", ],
   "text/x-pcs-gcd":	["gcd", ],
   "text/x-perl":	["pl", "pm", ],
   "text/x-python":	["py", ],
   "text/x-scala":	["scala", ],
   "text/x-setext":	["etx", ],
   "text/x-sh":	["sh", ],
   "text/x-tcl":	["tcl", "tk", ],
   "text/x-tex":	["tex", "ltx", "sty", "cls", ],
   "text/x-vcalendar":	["vcs", ],
   "text/x-vcard":	["vcf", ],
   "video/3gpp":	["3gp", ],
   "video/annodex":	["axv", ],
   "video/dl":	["dl", ],
   "video/dv":	["dif", "dv", ],
   "video/fli":	["fli", ],
   "video/gl":	["gl", ],
   "video/mpeg":	["mpeg", "mpg", "mpe", ],
   "video/mp4":	["mp4", ],
   "video/quicktime":	["qt", "mov", ],
   "video/ogg":	["ogv", ],
   "video/vnd.mpegurl":	["mxu", ],
   "video/x-flv":	["flv", ],
   "video/x-la-asf":	["lsf", "lsx", ],
   "video/x-mng":	["mng", ],
   "video/x-ms-asf":	["asf", "asx", ],
   "video/x-ms-wm":	["wm", ],
   "video/x-ms-wmv":	["wmv", ],
   "video/x-ms-wmx":	["wmx", ],
   "video/x-ms-wvx":	["wvx", ],
   "video/x-msvideo":	["avi", ],
   "video/x-sgi-movie":	["movie", ],
   "video/x-matroska":	["mpv", ],
   "x-conference/x-cooltalk":	["ice", ],
   "x-epoc/x-sisx-app":	["sisx", ],
   "x-world/x-vrml":	["vrm", "vrml", "wrl", ],
   "application/x-gettext-translation": ["mo", ],
   "application/x-gettext": ["po", ],
}

EXTENSIONS = {
   "cdr":	"image/x-coreldraw",
   "pgn":	"application/x-chess-pgn",
   "cu":	"application/cu-seeme",
   "key":	"application/pgp-keys",
   "bmp":	"image/x-ms-bmp",
   "odt":	"application/vnd.oasis.opendocument.text",
   "tsp":	"application/dsptype",
   "mmf":	"application/vnd.smaf",
   "scala":	"text/x-scala",
   "odb":	"application/vnd.oasis.opendocument.database",
   "stc":	"application/vnd.sun.xml.calc.template",
   "xhtml":	"application/xhtml+xml",
   "xht":	"application/xhtml+xml",
   "pdb":	"chemical/x-pdb",
   "ent":	"chemical/x-pdb",
   "wad":	"application/x-doom",
   "cod":	"application/vnd.rim.cod",
   "jnlp":	"application/x-java-jnlp-file",
   "mpv":	"video/x-matroska",
   "3gp":	"video/3gpp",
   "jam":	"application/x-jam",
   "mvb":	"chemical/x-mopac-vib",
   "tcl":	"application/x-tcl",
   "ics":	"text/calendar",
   "icz":	"text/calendar",
   "cpio":	"application/x-cpio",
   "ico":	"image/x-icon",
   "cpa":	"chemical/x-compass",
   "lyx":	"application/x-lyx",
   "csml":	"chemical/x-csml",
   "csm":	"chemical/x-csml",
   "sgl":	"application/vnd.stardivision.writer-global",
   "cxf":	"chemical/x-cxf",
   "cef":	"chemical/x-cxf",
   "xspf":	"application/xspf+xml",
   "swf":	"application/x-shockwave-flash",
   "swfl":	"application/x-shockwave-flash",
   "dif":	"video/dv",
   "dv":	"video/dv",
   "wmlc":	"application/vnd.wap.wmlc",
   "dl":	"video/dl",
   "xml":	"application/xml",
   "xsl":	"application/xml",
   "xsd":	"application/xml",
   "vcd":	"application/x-cdlink",
   "boo":	"text/x-boo",
   "wax":	"audio/x-ms-wax",
   "asf":	"video/x-ms-asf",
   "asx":	"video/x-ms-asf",
   "mmd":	"chemical/x-macromodel-input",
   "mmod":	"chemical/x-macromodel-input",
   "rpm":	"application/x-redhat-package-manager",
   "art":	"image/x-jg",
   "oga":	"audio/ogg",
   "ogg":	"audio/ogg",
   "spx":	"audio/ogg",
   "hqx":	"application/mac-binhex40",
   "alc":	"chemical/x-alchemy",
   "nwc":	"application/x-nwc",
   "jng":	"image/x-jng",
   "wm":	"video/x-ms-wm",
   "sct":	"text/scriptlet",
   "wsc":	"text/scriptlet",
   "cub":	"chemical/x-gaussian-cube",
   "sti":	"application/vnd.sun.xml.impress.template",
   "c3d":	"chemical/x-chem3d",
   "vcf":	"text/x-vcard",
   "c++":	"text/x-c++src",
   "cpp":	"text/x-c++src",
   "cxx":	"text/x-c++src",
   "cc":	"text/x-c++src",
   "tiff":	"image/tiff",
   "tif":	"image/tiff",
   "class":	"application/java-vm",
   "cdy":	"application/vnd.cinderella",
   "kpr":	"application/x-kpresenter",
   "kpt":	"application/x-kpresenter",
   "chrt":	"application/x-kchart",
   "b":	"chemical/x-molconn-Z",
   "chm":	"chemical/x-chemdraw",
   "msi":	"application/x-msi",
   "mol2":	"chemical/x-mol2",
   "ras":	"image/x-cmu-raster",
   "ods":	"application/vnd.oasis.opendocument.spreadsheet",
   "sdd":	"application/vnd.stardivision.impress",
   "php4":	"application/x-httpd-php4",
   "php3":	"application/x-httpd-php3",
   "mop":	"chemical/x-mopac-input",
   "mopcrt":	"chemical/x-mopac-input",
   "mpc":	"chemical/x-mopac-input",
   "zmt":	"chemical/x-mopac-input",
   "lhs":	"text/x-literate-haskell",
   "wma":	"audio/x-ms-wma",
   "vcs":	"text/x-vcalendar",
   "m3u":	"audio/x-mpegurl",
   "cdx":	"chemical/x-cdx",
   "oza":	"application/x-oz-application",
   "wk":	"application/x-123",
   "com":	"application/x-msdos-program",
   "exe":	"application/x-msdos-program",
   "bat":	"application/x-msdos-program",
   "dll":	"application/x-msdos-program",
   "stw":	"application/vnd.sun.xml.writer.template",
   "eml":	"message/rfc822",
   "xcf":	"application/x-xcf",
   "hdf":	"application/x-hdf",
   "mid":	"audio/midi",
   "midi":	"audio/midi",
   "kar":	"audio/midi",
   "cml":	"chemical/x-cml",
   "rb":	"application/x-ruby",
   "wmx":	"video/x-ms-wmx",
   "inp":	"chemical/x-gamess-input",
   "gam":	"chemical/x-gamess-input",
   "gamin":	"chemical/x-gamess-input",
   "xbm":	"image/x-xbitmap",
   "sv4cpio":	"application/x-sv4cpio",
   "amr":	"audio/amr",
   "phtml":	"application/x-httpd-php",
   "pht":	"application/x-httpd-php",
   "php":	"application/x-httpd-php",
   "cat":	"application/vnd.ms-pki.seccat",
   "wmv":	"video/x-ms-wmv",
   "tcl":	"text/x-tcl",
   "tk":	"text/x-tcl",
   "rss":	"application/rss+xml",
   "anx":	"application/annodex",
   "jar":	"application/java-archive",
   "rtx":	"text/richtext",
   "atomsrv":	"application/atomserv+xml",
   "ps":	"application/postscript",
   "ai":	"application/postscript",
   "eps":	"application/postscript",
   "espi":	"application/postscript",
   "epsf":	"application/postscript",
   "eps2":	"application/postscript",
   "eps3":	"application/postscript",
   "dvi":	"application/x-dvi",
   "csf":	"chemical/x-cache-csf",
   "qtl":	"application/x-quicktimeplayer",
   "dcr":	"application/x-director",
   "dir":	"application/x-director",
   "dxr":	"application/x-director",
   "psd":	"image/x-photoshop",
   "tm":	"text/texmacs",
   "ts":	"text/texmacs",
   "sxd":	"application/vnd.sun.xml.draw",
   "wav":	"audio/x-wav",
   "flv":	"video/x-flv",
   "fli":	"video/fli",
   "mdb":	"application/msaccess",
   "oth":	"application/vnd.oasis.opendocument.text-web",
   "gpt":	"chemical/x-mopac-graph",
   "igs":	"model/iges",
   "iges":	"model/iges",
   "kml":	"application/vnd.google-earth.kml+xml",
   "hin":	"chemical/x-hin",
   "py":	"text/x-python",
   "msh":	"model/mesh",
   "mesh":	"model/mesh",
   "silo":	"model/mesh",
   "qgs":	"application/x-qgis",
   "shp":	"application/x-qgis",
   "shx":	"application/x-qgis",
   "ros":	"chemical/x-rosdal",
   "sd":	"chemical/x-mdl-sdfile",
   "sdf":	"chemical/x-mdl-sdfile",
   "jdx":	"chemical/x-jcamp-dx",
   "dx":	"chemical/x-jcamp-dx",
   "gcd":	"text/x-pcs-gcd",
   "atomcat":	"application/atomcat+xml",
   "ica":	"application/x-ica",
   "bib":	"text/x-bibtex",
   "7z":	"application/x-7z-compressed",
   "latex":	"application/x-latex",
   "gcf":	"application/x-graphing-calculator",
   "wmlsc":	"application/vnd.wap.wmlscriptc",
   "etx":	"text/x-setext",
   "odg":	"application/vnd.oasis.opendocument.graphics",
   "sw":	"chemical/x-swissprot",
   "bsd":	"chemical/x-crossfire",
   "pgm":	"image/x-portable-graymap",
   "sgf":	"application/x-go-sgf",
   "frm":	"application/x-maker",
   "maker":	"application/x-maker",
   "frame":	"application/x-maker",
   "fm":	"application/x-maker",
   "fb":	"application/x-maker",
   "book":	"application/x-maker",
   "fbdoc":	"application/x-maker",
   "cif":	"chemical/x-cif",
   "wrl":	"model/vrml",
   "vrml":	"model/vrml",
   "dmg":	"application/x-apple-diskimage",
   "asc":	"text/plain",
   "txt":	"text/plain",
   "text":	"text/plain",
   "pot":	"text/plain",
   "brf":	"text/plain",
   "src":	"application/x-wais-source",
   "man":	"application/x-troff-man",
   "lha":	"application/x-lha",
   "val":	"chemical/x-ncbi-asn1-binary",
   "aso":	"chemical/x-ncbi-asn1-binary",
   "m3g":	"application/m3g",
   "svg":	"image/svg+xml",
   "svgz":	"image/svg+xml",
   "odm":	"application/vnd.oasis.opendocument.text-master",
   "lsf":	"video/x-la-asf",
   "lsx":	"video/x-la-asf",
   "ra":	"audio/x-realaudio",
   "uls":	"text/iuls",
   "wz":	"application/x-wingz",
   "gif":	"image/gif",
   "js":	"application/javascript",
   "ez":	"application/andrew-inset",
   "sxm":	"application/vnd.sun.xml.math",
   "pnm":	"image/x-portable-anymap",
   "istr":	"chemical/x-isostar",
   "ist":	"chemical/x-isostar",
   "ppt":	"application/vnd.ms-powerpoint",
   "pps":	"application/vnd.ms-powerpoint",
   "lzh":	"application/x-lzh",
   "wml":	"text/vnd.wap.wml",
   "sv4crc":	"application/x-sv4crc",
   "lzx":	"application/x-lzx",
   "mpeg":	"video/mpeg",
   "mpg":	"video/mpeg",
   "mpe":	"video/mpeg",
   "odi":	"application/vnd.oasis.opendocument.image",
   "aif":	"audio/x-aiff",
   "aiff":	"audio/x-aiff",
   "aifc":	"audio/x-aiff",
   "gsm":	"audio/x-gsm",
   "ins":	"application/x-internet-signup",
   "isp":	"application/x-internet-signup",
   "wmz":	"application/x-ms-wmz",
   "c":	"text/x-csrc",
   "java":	"text/x-java",
   "spl":	"application/x-futuresplash",
   "flac":	"audio/flac",
   "fig":	"application/x-xfig",
   "rd":	"chemical/x-mdl-rdfile",
   "wmd":	"application/x-ms-wmd",
   "spl":	"application/futuresplash",
   "pbm":	"image/x-portable-bitmap",
   "ots":	"application/vnd.oasis.opendocument.spreadsheet-template",
   "odc":	"application/vnd.oasis.opendocument.chart",
   "xyz":	"chemical/x-xyz",
   "spc":	"chemical/x-galactic-spc",
   "cmdf":	"chemical/x-cmdf",
   "mpga":	"audio/mpeg",
   "mpega":	"audio/mpeg",
   "mp2":	"audio/mpeg",
   "mp3":	"audio/mpeg",
   "m4a":	"audio/mpeg",
   "ser":	"application/java-serialized-object",
   "mm":	"application/x-freemind",
   "gf":	"application/x-tex-gf",
   "pl":	"text/x-perl",
   "pm":	"text/x-perl",
   "kwd":	"application/x-kword",
   "kwt":	"application/x-kword",
   "wpd":	"application/vnd.wordperfect",
   "tar":	"application/x-tar",
   "wvx":	"video/x-ms-wvx",
   "ustar":	"application/x-ustar",
   "mml":	"text/mathml",
   "h++":	"text/x-c++hdr",
   "hpp":	"text/x-c++hdr",
   "hxx":	"text/x-c++hdr",
   "hh":	"text/x-c++hdr",
   "es":	"application/ecmascript",
   "wp5":	"application/vnd.wordperfect5.1",
   "torrent":	"application/x-bittorrent",
   "shar":	"application/x-shar",
   "asn":	"chemical/x-ncbi-asn1-spec",
   "cer":	"chemical/x-cerius",
   "~":	"application/x-trash",
   "%":	"application/x-trash",
   "bak":	"application/x-trash",
   "old":	"application/x-trash",
   "sik":	"application/x-trash",
   "prf":	"application/pics-rules",
   "rgb":	"image/x-rgb",
   "sh":	"text/x-sh",
   "sxc":	"application/vnd.sun.xml.calc",
   "gnumeric":	"application/x-gnumeric",
   "stl":	"application/vnd.ms-pki.stl",
   "pac":	"application/x-ns-proxy-autoconfig",
   "dat":	"application/x-ns-proxy-autoconfig",
   "sdf":	"application/vnd.stardivision.math",
   "ra":	"audio/x-pn-realaudio",
   "rm":	"audio/x-pn-realaudio",
   "ram":	"audio/x-pn-realaudio",
   "smi":	"application/smil",
   "smil":	"application/smil",
   "sit":	"application/x-stuffit",
   "sitx":	"application/x-stuffit",
   "gcg":	"chemical/x-gcg8-sequence",
   "xtel":	"chemical/x-xtel",
   "ogx":	"application/ogg",
   "rar":	"application/rar",
   "mxu":	"video/vnd.mpegurl",
   "gen":	"chemical/x-genbank",
   "ief":	"image/ief",
   "ott":	"application/vnd.oasis.opendocument.text-template",
   "vsd":	"application/vnd.visio",
   "cpt":	"application/mac-compactpro",
   "mcif":	"chemical/x-mmcif",
   "sda":	"application/vnd.stardivision.draw",
   "pyc":	"application/x-python-code",
   "pyo":	"application/x-python-code",
   "cap":	"application/cap",
   "pcap":	"application/cap",
   "jmz":	"application/x-jmol",
   "awb":	"audio/amr-wb",
   "sds":	"application/vnd.stardivision.chart",
   "axv":	"video/annodex",
   "xul":	"application/vnd.mozilla.xul+xml",
   "pls":	"audio/x-scpls",
   "xwd":	"image/x-xwindowdump",
   "bcpio":	"application/x-bcpio",
   "sxw":	"application/vnd.sun.xml.writer",
   "sh":	"application/x-sh",
   "rxn":	"chemical/x-mdl-rxnfile",
   "htc":	"text/x-component",
   "sis":	"application/vnd.symbian.install",
   "kil":	"application/x-killustrator",
   "rhtml":	"application/x-httpd-eruby",
   "axa":	"audio/annodex",
   "hta":	"application/hta",
   "p7r":	"application/x-pkcs7-certreqresp",
   "phps":	"application/x-httpd-php-source",
   "emb":	"chemical/x-embl-dl-nucleotide",
   "embl":	"chemical/x-embl-dl-nucleotide",
   "h":	"text/x-chdr",
   "cbr":	"application/x-cbr",
   "csv":	"text/csv",
   "css":	"text/css",
   "cbz":	"application/x-cbz",
   "iso":	"application/x-iso9660-image",
   "wbxml":	"application/vnd.wap.wbxml",
   "mp4":	"video/mp4",
   "texinfo":	"application/x-texinfo",
   "texi":	"application/x-texinfo",
   "m3u":	"audio/mpegurl",
   "wbmp":	"image/vnd.wap.wbmp",
   "sisx":	"x-epoc/x-sisx-app",
   "otp":	"application/vnd.oasis.opendocument.presentation-template",
   "abw":	"application/x-abiword",
   "cdt":	"image/x-coreldrawtemplate",
   "cbin":	"chemical/x-cactvs-binary",
   "cascii":	"chemical/x-cactvs-binary",
   "ctab":	"chemical/x-cactvs-binary",
   "movie":	"video/x-sgi-movie",
   "o":	"application/x-object",
   "vrm":	"x-world/x-vrml",
   "vrml":	"x-world/x-vrml",
   "wrl":	"x-world/x-vrml",
   "zip":	"application/zip",
   "rdf":	"application/rdf+xml",
   "ctx":	"chemical/x-ctx",
   "moo":	"chemical/x-mopac-out",
   "pcx":	"image/pcx",
   "avi":	"video/x-msvideo",
   "tsv":	"text/tab-separated-values",
   "doc":	"application/msword",
   "dot":	"application/msword",
   "qt":	"video/quicktime",
   "mov":	"video/quicktime",
   "png":	"image/png",
   "xpm":	"image/x-xpixmap",
   "crt":	"application/x-x509-ca-cert",
   "dms":	"application/x-dms",
   "csh":	"text/x-csh",
   "sid":	"audio/prs.sid",
   "cab":	"application/x-cab",
   "oda":	"application/oda",
   "xls":	"application/vnd.ms-excel",
   "xlb":	"application/vnd.ms-excel",
   "xlt":	"application/vnd.ms-excel",
   "rtf":	"application/rtf",
   "nc":	"application/x-netcdf",
   "html":	"text/html",
   "htm":	"text/html",
   "shtml":	"text/html",
   "tex":	"text/x-tex",
   "ltx":	"text/x-tex",
   "sty":	"text/x-tex",
   "cls":	"text/x-tex",
   "ice":	"x-conference/x-cooltalk",
   "jad":	"text/vnd.sun.j2me.app-descriptor",
   "sdc":	"application/vnd.stardivision.calc",
   "pat":	"image/x-coreldrawpattern",
   "otg":	"application/vnd.oasis.opendocument.graphics-template",
   "gal":	"chemical/x-gaussian-log",
   "prt":	"chemical/x-ncbi-asn1-ascii",
   "ent":	"chemical/x-ncbi-asn1-ascii",
   "odf":	"application/vnd.oasis.opendocument.formula",
   "kmz":	"application/vnd.google-earth.kmz",
   "wmls":	"text/vnd.wap.wmlscript",
   "crl":	"application/x-pkcs7-crl",
   "pdf":	"application/pdf",
   "iii":	"application/x-iphone",
   "deb":	"application/x-debian-package",
   "udeb":	"application/x-debian-package",
   "gtar":	"application/x-gtar",
   "tgz":	"application/x-gtar",
   "taz":	"application/x-gtar",
   "bin":	"application/octet-stream",
   "pgp":	"application/pgp-signature",
   "atom":	"application/atom+xml",
   "odp":	"application/vnd.oasis.opendocument.presentation",
   "p":	"text/x-pascal",
   "pas":	"text/x-pascal",
   "sxi":	"application/vnd.sun.xml.impress",
   "skp":	"application/x-koan",
   "skd":	"application/x-koan",
   "skt":	"application/x-koan",
   "skm":	"application/x-koan",
   "mif":	"#chemical/x-mif",
   "nb":	"application/mathematica",
   "nbp":	"application/mathematica",
   "cpt":	"image/x-corelphotopaint",
   "lin":	"application/bbolin",
   "me":	"application/x-troff-me",
   "323":	"text/h323",
   "gau":	"chemical/x-gaussian-input",
   "gjc":	"chemical/x-gaussian-input",
   "gjf":	"chemical/x-gaussian-input",
   "ms":	"application/x-troff-ms",
   "mif":	"application/x-mif",
   "mcm":	"chemical/x-macmolecule",
   "moc":	"text/x-moc",
   "diff":	"text/x-diff",
   "patch":	"text/x-diff",
   "xpi":	"application/x-xpinstall",
   "std":	"application/vnd.sun.xml.draw.template",
   "fch":	"chemical/x-gaussian-checkpoint",
   "fchk":	"chemical/x-gaussian-checkpoint",
   "vms":	"chemical/x-vamas-iso14976",
   "php3p":	"application/x-httpd-php3-preprocessed",
   "cdf":	"application/x-cdf",
   "cda":	"application/x-cdf",
   "sd2":	"audio/x-sd2",
   "djvu":	"image/vnd.djvu",
   "djv":	"image/vnd.djvu",
   "ogv":	"video/ogg",
   "davmount":	"application/davmount+xml",
   "csh":	"application/x-csh",
   "jpeg":	"image/jpeg",
   "jpg":	"image/jpeg",
   "jpe":	"image/jpeg",
   "ksp":	"application/x-kspread",
   "mol":	"chemical/x-mdl-molfile",
   "vmd":	"chemical/x-vmd",
   "sxg":	"application/vnd.sun.xml.writer.global",
   "info":	"application/x-info",
   "d":	"text/x-dsrc",
   "hs":	"text/x-haskell",
   "sdw":	"application/vnd.stardivision.writer",
   "pk":	"application/x-tex-pk",
   "ppm":	"image/x-portable-pixmap",
   "t":	"application/x-troff",
   "tr":	"application/x-troff",
   "roff":	"application/x-troff",
   "smi":	"#chemical/x-daylight-smiles",
   "tgf":	"chemical/x-mdl-tgf",
   "kin":	"chemical/x-kinemage",
   "au":	"audio/basic",
   "snd":	"audio/basic",
   "mng":	"video/x-mng",
   "asn":	"chemical/x-ncbi-asn1",
   "cac":	"chemical/x-cache",
   "cache":	"chemical/x-cache",
   "pfa":	"application/x-font",
   "pfb":	"application/x-font",
   "gsf":	"application/x-font",
   "pcf":	"application/x-font",
   "pcf.Z":	"application/x-font",
   "gl":	"video/gl",
   "mo":    "application/x-gettext-translation",
   "po":    "application/x-gettext",
}

IMAGES = {
   "image/gif":	["gif", ],
   "image/ief":	["ief", ],
   "image/jpeg":	["jpeg", "jpg", "jpe", ],
   "image/pcx":	["pcx", ],
   "image/png":	["png", ],
   "image/svg+xml":	["svg", "svgz", ],
   "image/tiff":	["tiff", "tif", ],
   "image/vnd.djvu":	["djvu", "djv", ],
   "image/vnd.wap.wbmp":	["wbmp", ],
   "image/x-cmu-raster":	["ras", ],
   "image/x-coreldraw":	["cdr", ],
   "image/x-coreldrawpattern":	["pat", ],
   "image/x-coreldrawtemplate":	["cdt", ],
   "image/x-corelphotopaint":	["cpt", ],
   "image/x-icon":	["ico", ],
   "image/x-jg":	["art", ],
   "image/x-jng":	["jng", ],
   "image/x-ms-bmp":	["bmp", ],
   "image/x-photoshop":	["psd", ],
   "image/x-portable-anymap":	["pnm", ],
   "image/x-portable-bitmap":	["pbm", ],
   "image/x-portable-graymap":	["pgm", ],
   "image/x-portable-pixmap":	["ppm", ],
   "image/x-rgb":	["rgb", ],
   "image/x-xbitmap":	["xbm", ],
   "image/x-xpixmap":	["xpm", ],
   "image/x-xwindowdump":	["xwd", ],
}

HTML = {
   "application/xhtml+xml":	["xhtml", "xht", ],
   "application/x-httpd-eruby":	["rhtml", ],
   "application/x-httpd-php":	["phtml", "pht", "php", ],
   "text/html":	["html", "htm", "shtml", ],
   "application/atom+xml":	["atom", ],
   "application/atomcat+xml":	["atomcat", ],
   "application/atomserv+xml":	["atomsrv", ],
   "application/davmount+xml":	["davmount", ],
   "application/rdf+xml":	["rdf", ],
   "application/rss+xml":	["rss", ],
   "application/xhtml+xml":	["xhtml", "xht", ],
   "application/xml":	["xml", "xsl", "xsd", ],
   "application/xspf+xml":	["xspf", ],
   "application/vnd.google-earth.kml+xml":	["kml", ],
   "application/vnd.mozilla.xul+xml":	["xul", ],
   "application/vnd.wap.wbxml":	["wbxml", ],
   "image/svg+xml":	["svg", "svgz", ],
}

TEXT = {
   "application/smil":	["smi", "smil", ],
   "application/x-httpd-php":	["phtml", "pht", "php", ],
   "application/x-httpd-php-source":	["phps", ],
   "application/x-httpd-php3":	["php3", ],
   "application/x-httpd-php3-preprocessed":	["php3p", ],
   "application/x-httpd-php4":	["php4", ],
   "application/x-ica":	["ica", ],
   "application/x-info":	["info", ],
   "application/x-sh":	["sh", ],
   "application/x-troff-man":	["man", ],
   "audio/mpegurl":	["m3u", ],
   "audio/x-mpegurl":	["m3u", ],
   "audio/x-scpls":	["pls", ],

   "text/calendar":	["ics", "icz", ],
   "text/css":	["css", ],
   "text/csv":	["csv", ],
   "text/h323":	["323", ],
   "text/html":	["html", "htm", "shtml", ],
   "text/iuls":	["uls", ],
   "text/mathml":	["mml", ],
   "text/plain":	["asc", "txt", "text", "pot", "brf", ],
   "text/richtext":	["rtx", ],
   "text/scriptlet":	["sct", "wsc", ],
   "text/texmacs":	["tm", "ts", ],
   "text/tab-separated-values":	["tsv", ],
   "text/vnd.sun.j2me.app-descriptor":	["jad", ],
   "text/vnd.wap.wml":	["wml", ],
   "text/vnd.wap.wmlscript":	["wmls", ],
   "text/x-bibtex":	["bib", ],
   "text/x-boo":	["boo", ],
   "text/x-c++hdr":	["h++", "hpp", "hxx", "hh", ],
   "text/x-c++src":	["c++", "cpp", "cxx", "cc", ],
   "text/x-chdr":	["h", ],
   "text/x-component":	["htc", ],
   "text/x-csh":	["csh", ],
   "text/x-csrc":	["c", ],
   "text/x-dsrc":	["d", ],
   "text/x-diff":	["diff", "patch", ],
   "text/x-haskell":	["hs", ],
   "text/x-java":	["java", ],
   "text/x-literate-haskell":	["lhs", ],
   "text/x-moc":	["moc", ],
   "text/x-pascal":	["p", "pas", ],
   "text/x-pcs-gcd":	["gcd", ],
   "text/x-perl":	["pl", "pm", ],
   "text/x-python":	["py", ],
   "text/x-scala":	["scala", ],
   "text/x-setext":	["etx", ],
   "text/x-sh":	["sh", ],
   "text/x-tcl":	["tcl", "tk", ],
   "text/x-tex":	["tex", "ltx", "sty", "cls", ],
   "text/x-vcalendar":	["vcs", ],
   "text/x-vcard":	["vcf", ],

   "application/x-gettext": ["po", ],
}

TEXT.update(HTML, )

